Show:

Places location Class

Allows the logged-in user to add his own locations and select among these locations

Constructor

Places location

(
  • [options]
)

Parameters:

  • [options] Object optional

    used to pass options

    • [publisherId=Q.Users.loggedInUserId()] String optional

      Override the publisherId for saving new locations.

    • [geocode] Object optional

      Default google location object, if available

    • [location] Places.Coordinates optional

      Provide a location to start off with. Can be anything that is accepted by Places.Coordinates constructor.

    • [showCurrent=true] Boolean optional

      Whether to allow user to select current location

    • [showLocations=true] Boolean optional

      Whether to allow user to select their saved locations

    • [showAddress=true] Boolean optional

      Whether to allow user to enter a custom address

    • [showAreas=false] Boolean optional

      Whether to show Places/areas tool for selected location

    • [onChoose] Q.Event optional

      User selected some valid location. First parameter is Places.Coordinates object.

Methods

getCurrentPosition

(
  • [success]
  • [fail]
)

Get current geolocation

Parameters:

  • [success] Function optional

    Callback for success

  • [fail] Function optional

    Callback for fail

refresh

()

Refresh the display

selectLocation

()

Render template with locations, so user can select one of them

toggle

(
  • elem
)

Make some needed actions when user select some other location.

Parameters: